import { createApp } from 'vue'
// import { createRouter, createWebHistory } from 'vue-router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import Admin from './adminLogin.vue'
import axios from 'axios';
const app = createApp(App)
const admin = createApp(Admin)



// axios.defaults.baseURL = "http://172.24.51.3:8081"
// axios.defaults.baseURL = "http://192.168.110.84:8081"
const instance = axios.create({
    // baseURL: 'http://172.24.51.3:8081', // 设置默认 API 地址
    baseURL: 'http://192.168.110.84:8081', // 设置默认 API 地址
    headers: {
        'Content-Type': 'application/json',
        // 其他需要的头部信息
    },
    // 其他配置...
});
app.config.globalProperties.$http = instance;
admin.config.globalProperties.$http = instance;
app.config.globalProperties.$apiBaseUrl = 'http://192.168.110.84:8081';
app.use(ElementPlus)
app.mount('#app')
admin.use(ElementPlus)
admin.mount('#admin')